function gen_set_params(SET,dyn_in)

M_ = dyn_in.M_ ;

tochg = [SET.tv_str_chg.ant_chg_params SET.tv_str_chg.unant_chg_params] ;

tmp = cellstr(dyn_in.M_.param_names) ;

index = 1:M_.param_nbr; 

tmpstr = '' ;
for i=1:M_.param_nbr
    tmpstr = [tmpstr, tmp{i},' = dyn_in.M_.params(', int2str(i), ');\n'] ;
end

old = ['',...
'iSS   = z * PISS * lgv/bet ;\n',...
'RSS   = z*lgv/bet;\n',...
'MC    = (theta-1)/theta ;\n',...
'NoK   = ((RSS-1+del)*(1/MC * (1/alph) * (a*b*z)^(alph-1)))^(1/(1-alph)) ;\n',...
'WSS   = MC * (1-alph)*a^(1-alph)*(z*b)^(-alph)*(NoK)^(-alph) ;\n',...
'YoK   = (RSS-1+del)*(1/MC*(1/alph)*(1/z)) ;\n',...
'CoK   = (1-0.2)*YoK-1+(1-del)/z ;\n',...
'KSS   = (WSS*(1-tau)*phi/(v*b^psi)*(NoK)^(-psi)*(CoK)^(-sig))^(1/(psi+sig)) ;\n',...
'NSS   = KSS*NoK ;\n',...
'CSS   = KSS*CoK ;\n',...
'YSS   = KSS*YoK ;\n',...
'lamSS = phi*CSS^(-psi)/lgv ;\n',...
'GSS   = log(0.2*YSS) ;\n',...
'inveSS = KSS*(1 - (1-del)/z) ;\n',...
'NSS   = KSS*NoK ;\n',...
'phi_p = (theta-1) / slop_p ;\n',...
'xsteady(1) = CSS ;\n',...
'xsteady(2) = YSS ;\n',...
'xsteady(3) = GSS ;\n',...
'xsteady(4) = KSS ;\n',...
'xsteady(5) = NSS ;\n',...
'xsteady(6) = WSS ;\n',...
'xsteady(7) = RSS ;\n',...
'xsteady(8) = lamSS ;\n',...
'xsteady(9) = 0 ;\n',...
'xsteady(10) = 0 ;\n',...
'xsteady(11) = PISS ;\n',...
'xsteady(12) = iSS ;\n',...
'xsteady(13) = MC ;\n',...
'xsteady(14) = 0 ;\n',...
'xsteady(15) = lamSS ;\n',...
'xsteady(16) = RSS ;\n',...
'xsteady(17) = CSS ;\n',...
'xsteady(18) = NSS ;\n',...
'xsteady(19) = WSS ;\n',...
'xsteady(20) = YSS ;\n',...
'xsteady(21) = KSS ;\n',...
'xsteady(22) = log(iSS) ;\n',...
'xsteady(23) = log(PISS) ;\n',...
'xsteady(24) = log(z) ;\n',...
'xsteady(25) = log(z) ;\n',...
'xsteady(26) = log(z) ;\n',...
'xsteady(27) = log(z) ;\n',...
'xsteady(28) = inveSS ;\n',...
'xsteady(29) = 0 ;\n',...
'xsteady(30) = 0 ;\n',...
'xsteady(31) = b*NSS ;\n',...
'xsteady(32) = log(iSS)-log(PISS) ;\n'] ;

tmpstr2 = '' ;
for i=1:M_.param_nbr
    tmpstr2 = [tmpstr2, ' out(', int2str(i), ')=',tmp{i},';\n'] ;
end

old = [tmpstr, old, tmpstr2] ;

fid = fopen('set_params.m','wt');

fprintf(fid, old) ;

fclose(fid);